package com.github.niefy.modules.wx.result;

import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;

public class WxMpDraftUploadResult {
    private static final long serialVersionUID = -128818731449449537L;
    private String mediaId;

    public static WxMpDraftUploadResult fromJson(String json) {
        return (WxMpDraftUploadResult) WxMpGsonBuilder.create().fromJson(json, WxMpDraftUploadResult.class);
    }

    public String toString() {
        return WxMpGsonBuilder.create().toJson(this);
    }

    public WxMpDraftUploadResult(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getMediaId() {
        return this.mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof WxMpDraftUploadResult)) {
            return false;
        } else {
            WxMpDraftUploadResult other = (WxMpDraftUploadResult)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$mediaId = this.getMediaId();
                    Object other$mediaId = other.getMediaId();
                    if (this$mediaId == null) {
                        if (other$mediaId == null) {
                            break label59;
                        }
                    } else if (this$mediaId.equals(other$mediaId)) {
                        break label59;
                    }

                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof WxMpDraftUploadResult;
    }

    public int hashCode() {
        int result = 1;
        Object $mediaId = this.getMediaId();
        result = result * 59 + ($mediaId == null ? 43 : $mediaId.hashCode());
        return result;
    }
}